
import { assign, map, concat } from 'lodash'
import { request, requestForMock } from './service'
import * as tools from './tools'

const files = require.context('./modules', true, /index\.js$/)
const generators = files.keys().map(key => files(key).default)

export default assign({},
  ...concat(...map(generators, funs => funs({
    request,
    requestForMock,
    tools
  }))
  )
)
